package com.chengccn.oauth2.server.service.impl;

import com.chengccn.oauth2.server.domain.TbUser;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.chengccn.oauth2.server.mapper.TbUserMapper;
import com.chengccn.oauth2.server.service.TbUserService;
import tk.mybatis.mapper.entity.Example;

/**
 * @Author:     Administrator
 * @Description:  ${description}  
 * @Date:    2019/5/14 12:45
 * @Version:    1.0
 */
@Service
public class TbUserServiceImpl implements TbUserService{

    @Resource
    private TbUserMapper tbUserMapper;

    @Override
    public TbUser getByUsername(String username) {
        Example example = new Example(TbUser.class);
        example.createCriteria().andEqualTo("username", username);
        return tbUserMapper.selectOneByExample(example);
    }

}
